<?php

namespace app\api\model\user;

use app\api\model\Models;

class UserInfo extends Models
{
    /**
     * 关闭自动写入时间戳
     * @var boolean
     */
    protected $autoWriteTimestamp = false;

    /**
     * 设置只读字段
     * @var []
     */
    protected $readonly = ['id','uid'];

    /**
     * 根据uid查询
     * @return mixed
     */
    public function scopeUid( $query, int $uid )
    {
        $query->where('uid', $uid);
    }
}
